package com.kang.controller;

import com.kang.commons.Result;
import com.kang.service.userService.DialogueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @program: photo_fawu
 * @description:
 * @author: K.faWu
 * @create: 2021-11-23 18:01
 **/
@RestController
@RequestMapping("/dialogue")
public class DialogueController {
    @Autowired
    private DialogueService dialogueService;

    @GetMapping("/{toUserId}")
    public Result<?> getHistoricalNews(@PathVariable("toUserId") Long toUserId, HttpServletRequest request){
        return dialogueService.getHistorIcalNews(toUserId);
    }
}
